home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 52 / Amiga Format AFCD52 (Issue 136, May 2000).iso / -in_the_mag- / reader_requests / notes / english / basskey.file < prev    next >
Text File  |  2000-02-23  |  35KB  |  1,224 lines

  1. /* subprogramm to notes.pprx */
  2.  
  3. signal on halt
  4. signal on break_c
  5. signal on break_e
  6. signal on break_d
  7. call ppm_SetStyle(N)
  8. call ppm_SetMagMode(180)
  9. call ppm_UpdateScreen()
  10.  
  11. noteneingabe:
  12.     /* smallest note distance */
  13.  
  14.     xgrdform = "(1,2,4,8 or 16)"
  15.     xgrd = ppm_GetForm("Pleace choice the smallest note distance...(nothing=BREAK)", 3, xgrdform)
  16.     if xgrd == '' then exit_msg("user break !")
  17.     select
  18.      when xgrd == '1' then xg =0.7
  19.      when xgrd == '2' then xg =1.4
  20.      when xgrd == '4' then xg =2.8
  21.      when xgrd == '8' then xg =5.6
  22.      when xgrd == '16' then xg =11.2
  23.      otherwise noteneingabe()
  24.     end
  25.  
  26.    /* pointheighth of the notes */
  27.    notepkt = 26
  28.    call ppm_SetJustification(0)
  29.  
  30.    zz = 0 /* line counter */
  31.    notex = 2.5
  32.    page = ppm_CurrentPage()
  33.  
  34. pfad:
  35.    do
  36.            choose=ppm_Inform(2,"Please choice: notefile or break ...", "Break","File")
  37.            if choose == 0 then exit_msg("Break !")
  38.            eingabe = ppm_GetFileName("Please choice the notescriptfile ...", "Notes:")
  39.            res = OPEN(notenfile, eingabe, 'R')
  40.            if res == 0 then
  41.              do
  42.                  call ppm_inform(1,"There was an error, or the file doesn't exist !!!","OK")
  43.                  pfad()
  44.              end
  45.            call ppm_ShowStatus("OK, I'm working ...")
  46.            auslesen(notenfile)
  47.    end
  48.  
  49.     /* x-distance of the notes */
  50. auslesen:
  51.         do
  52.           parse arg file
  53.           noten = READCH(file, 4000)
  54.           i=1
  55.           do forever
  56.             nw = word(noten, i)
  57.             nn = word(noten, i+1)
  58.             al = word(noten, i+2)
  59.             if nw == 'P' then nw = 'p'   /*pause*/
  60.             if nw == 'D' then nw = 'd'   /*delete*/
  61.             if nw == 'C' then nw = 'c'   /*space*/
  62.             if nw == 'L' then nw = 'l'   /*barline*/
  63.             if nn == 'L' then nn = 'l'   /*barline*/
  64.             if nw == 'J' then nw = 'j'   /*jump*/
  65.             if nw == 'END' then nw = 'end'   /*end*/
  66.             if al == 'N' then al = 'n'   /*natural sign*/
  67.             call auswahl()
  68.             i=i+3
  69.           end
  70.         end
  71.  
  72. auswahl:
  73. do
  74.     select
  75.       when nw == 'j' then do
  76.                           zz = 0   /* line counter */
  77.                           notex = 2.5
  78.                           return
  79.                           end
  80.       when nw == 'end' then
  81.         do
  82.             call ppm_ClearStatus()
  83.             exit_msg("Ready!")
  84.         end
  85.       when nw == 's' then
  86.           do
  87.           xw = xg/16
  88.           nw='x'
  89.           yv = 0
  90.           end
  91.       when nw  == 'S' then
  92.           do
  93.           xw = xg/16
  94.           nw='X'
  95.           yv = 0.47
  96.           end
  97.       when nw == 'e' then
  98.           do
  99.           xw = xg/8
  100.           nw='e'
  101.           yv = 0
  102.           end
  103.       when nw == 'E' then
  104.           do
  105.           xw = xg/8
  106.           nw='E'
  107.           yv = 0.47
  108.           end
  109.       when nw == 'q' then
  110.           do
  111.           xw = xg/4
  112.           nw='q'
  113.           yv = 0
  114.           end
  115.       when nw == 'Q' then
  116.           do
  117.           xw = xg/4
  118.           nw='Q'
  119.           yv = 0.47
  120.           end
  121.       when nw == 'h' then
  122.           do
  123.           xw = xg/2
  124.           yv = 0
  125.           end
  126.       when nw == 'H' then
  127.           do
  128.           xw = xg/2
  129.           yv = 0.47
  130.           end
  131.       when nw == 'w' then
  132.           do
  133.           xw = xg
  134.           nw='w'
  135.           yv = 0
  136.           end
  137.       when nw == 'W' then
  138.           do
  139.           xw = xg
  140.           nw='W'
  141.           yv = 0.47
  142.           end
  143.  
  144.       when nw == 'pt' then
  145.           do
  146.             call ppm_SetSize(25)
  147.             box#id = ppm_CreateBox(notex-xw+0.4, yw+zz+0.26-yv, 0.3, 0.9, 0)
  148.             call ppm_SetSize(20)
  149.             call ppm_TextIntoBox(box#id, 'd')
  150.  
  151.              select
  152.                  when nn == '1' then
  153.                  do
  154.                   xw = xg
  155.                   notex = notex+xw
  156.                  end
  157.                  when nn == '2' then
  158.                  do
  159.                   xw = xg/2
  160.                   notex = notex+xw
  161.                  end
  162.                  when nn == '4' then
  163.                  do
  164.                   xw = xg/4
  165.                   notex = notex+xw
  166.                  end
  167.                  when nn == '8' then
  168.                  do
  169.                   xw = xg/8
  170.                   notex = notex+xw
  171.                  end
  172.                  when nn == '16' then
  173.                  do
  174.                   xw  = xg/16
  175.                   notex = notex+xw
  176.                  end
  177.                  when nn == 'c' then
  178.                  do
  179.                   xw  = 0.2
  180.                   notex = notex+xw
  181.                  end
  182.                  otherwise
  183.                   do
  184.                    call ppm_ClearStatus()
  185.                    exit_msg("There was an error !")
  186.                   end
  187.              end
  188.            if notex >=18.7 then
  189.                do
  190.                  notex = 2.5
  191.                  zz = zz + 4
  192.                end
  193.            return
  194.           end
  195.  
  196.       when nw == 'PT' then
  197.           do
  198.             call ppm_SetSize(25)
  199.             box#id = ppm_CreateBox(notex-xw+0.4, yw+zz+0.26-yv, 0.3, 0.9, 0)
  200.             call ppm_SetSize(20)
  201.             call ppm_TextIntoBox(box#id, 'd')
  202.            select
  203.                when nn == '1' then
  204.                 do
  205.                  xw = xg
  206.                  notex = notex+xw
  207.                 end
  208.                when nn == '2' then
  209.                 do
  210.                  xw = xg/2
  211.                  notex = notex+xw
  212.                 end
  213.                when nn == '4' then
  214.                 do
  215.                  xw = xg/4
  216.                  notex = notex+xw
  217.                 end
  218.                when nn == '8' then
  219.                 do
  220.                  xw = xg/8
  221.                  notex = notex+xw
  222.                 end
  223.                when nn == '16' then
  224.                 do
  225.                  xw  = xg/16
  226.                  notex = notex+xw
  227.                 end
  228.                when nn == 'c' then
  229.                 do
  230.                  xw  = 0.2
  231.                  notex = notex+xw
  232.                 end
  233.                otherwise
  234.                do
  235.                 call ppm_ClearStatus()
  236.                 exit_msg("There was an error !")
  237.                end
  238.            end
  239.            if notex >=18.7 then
  240.              do
  241.                notex = 2.5
  242.                zz = zz + 4
  243.              end
  244.            return
  245.           end
  246.  
  247.  
  248.       /* bar line */
  249.       when nw == 'l' then
  250.           do
  251.            call ppm_SetLineWeight(0.25)
  252.            call ppm_DrawLine(notex, 4+zz, notex, 4.8+zz)
  253.            notex = notex+0.2
  254.            return
  255.           end
  256.  
  257.  
  258.       when nw == 'p' | when nw == 'P' then
  259.       do
  260. pausenwert:
  261.         x = notex
  262.         select
  263.             when nn == '1' then do
  264.  
  265.                 y = 4.29+zz
  266.                 call ppm_SetLineWeight(4)
  267.                 call ppm_DrawLine(x, y, x+0.4, y)
  268.                 call ppm_SetLineWeight(0.25)
  269.                 xw = xg
  270.                 notex = notex+xw
  271.             end
  272.  
  273.             when nn == '2' then do
  274.  
  275.                 y = 4.33+zz
  276.                 call ppm_SetLineWeight(4)
  277.                 call ppm_DrawLine(x, y, x+0.4, y)
  278.                 call ppm_SetLineWeight(0.25)
  279.                 xw = xg/2
  280.                 notex = notex+xw
  281.             end
  282.  
  283.             when nn == '4' then do
  284.  
  285.                 y = 4.07+zz
  286.                 Pbox = ppm_CreateBox(x, y, 0.59, 0.86, 0)
  287.                 boxnm = ppm_DocNextBox(Pbox)
  288.                 call ppm_DeleteContents(boxnm)
  289.                 call ppm_ImportGraphic(boxnm, 'Genies:note_pause/quarterpause', pause)
  290.                 xw = xg/4
  291.                 notex = notex+xw
  292.             end
  293.  
  294.             when nn == '8' then do
  295.  
  296.                 y = 4.21+zz
  297.                 Pbox = ppm_CreateBox(x, y, 0.27, 0.42, 0)
  298.                 boxnm = ppm_DocNextBox(Pbox)
  299.                 call ppm_DeleteContents(boxnm)
  300.                 call ppm_ImportGraphic(boxnm, 'Genies:note_pause/eighthpause', pause)
  301.                 xw = xg/8
  302.                 notex = notex+xw
  303.             end
  304.  
  305.             when nn == '16' then do
  306.  
  307.                 y = 4.21+zz
  308.                 Pbox = ppm_CreateBox(x, y, 0.27, 0.42, 0)
  309.                 boxnm = ppm_DocNextBox(Pbox)
  310.                 call ppm_DeleteContents(boxnm)
  311.                 call ppm_ImportGraphic(boxnm, 'Genies:note_pause/sixteenthpause', pause)
  312.                 xw = xg/16
  313.                 notex = notex+xw
  314.             end
  315.         otherwise
  316.                do
  317.                 call ppm_ClearStatus()
  318.                 exit_msg("There was an error !")
  319.                end
  320.         end
  321.         if notex >=18.7 then
  322.           do
  323.             notex = 2.5
  324.             zz = zz + 4
  325.           end
  326.         return
  327.       end
  328.  
  329.     /*  spaces */
  330.  
  331.       when nw == 'c' then
  332.         do
  333.            select
  334.                when nn == '1' then
  335.                do
  336.                 xw = xg
  337.                 notex = notex+xw
  338.                end
  339.                when nn == '2' then
  340.                do
  341.                 xw = xg/2
  342.                 notex = notex+xw
  343.                end
  344.                when nn == '4' then
  345.                do
  346.                 xw = xg/4
  347.                 notex = notex+xw
  348.                end
  349.                when nn == '8' then
  350.                do
  351.                 xw = xg/8
  352.                 notex = notex+xw
  353.                end
  354.                when nn == '16' then
  355.                do
  356.                 xw  = xg/16
  357.                 notex = notex+xw
  358.                end
  359.                when nn == 'l' then
  360.                do
  361.                 xw  = 0.2
  362.                 notex = notex+xw
  363.                end
  364.                when nn == 0 then do
  365.                end
  366.                otherwise
  367.                do
  368.                 call ppm_ClearStatus()
  369.                 exit_msg("There was an error !")
  370.                end
  371.            end
  372.            if notex >=18.7 then
  373.              do
  374.                notex = 2.5
  375.                zz = zz + 4
  376.              end
  377.            return
  378.         end
  379.       when nw == 'E' then nw = 'e'
  380.       when nw == 'e' then
  381.         do
  382.             call ppm_ClearStatus()
  383.             exit_msg("Ready !")
  384.         end
  385.       otherwise
  386.                do
  387.                 call ppm_ClearStatus()
  388.                 exit_msg("There was an error !")
  389.                end
  390.     end
  391.  
  392.         /* y-place of the notes - noteneck to top */
  393.  
  394.     call ppm_SetLineWeight(0.25)
  395.  
  396.     select
  397.  
  398.         when nn=='g#3'  then
  399.         do
  400.             yw = 2.745
  401.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.32, 0.35, 0.75, 0)
  402.             call ppm_SetSize(20)
  403.             call ppm_TextIntoBox(box#id, 's')
  404.             call ppm_DrawLine(notex, zz+3.8, (notex+0.4), zz+3.8)
  405.             call ppm_DrawLine(notex, zz+3.6, (notex+0.4), zz+3.6)
  406.             call ppm_DrawLine(notex, zz+3.4, (notex+0.4), zz+3.4)
  407.         end
  408.  
  409.         when nn=='g3'  then
  410.         do
  411.             yw = 2.745
  412.             if al == 'n' then call naturaltop()
  413.             call ppm_DrawLine(notex, zz+3.8, (notex+0.4), zz+3.8)
  414.             call ppm_DrawLine(notex, zz+3.6, (notex+0.4), zz+3.6)
  415.             call ppm_DrawLine(notex, zz+3.4, (notex+0.4), zz+3.4)
  416.         end
  417.  
  418.         when nn=='gb3' then
  419.         do
  420.             yw = 2.745
  421.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.21, 0.35, 0.75, 0)
  422.             call ppm_SetSize(20)
  423.             call ppm_TextIntoBox(box#id, 'f')
  424.             call ppm_DrawLine(notex, zz+3.8, (notex+0.4), zz+3.8)
  425.             call ppm_DrawLine(notex, zz+3.6, (notex+0.4), zz+3.6)
  426.             call ppm_DrawLine(notex, zz+3.4, (notex+0.4), zz+3.4)
  427.         end
  428.  
  429.         when nn=='f#3'  then
  430.         do
  431.             yw = 2.845
  432.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.32, 0.35, 0.75, 0)
  433.             call ppm_SetSize(20)
  434.             call ppm_TextIntoBox(box#id, 's')
  435.             call ppm_DrawLine(notex, zz+3.8, (notex+0.4), zz+3.8)
  436.             call ppm_DrawLine(notex, zz+3.6, (notex+0.4), zz+3.6)
  437.         end
  438.  
  439.         when nn=='f3'  then
  440.         do
  441.             yw = 2.845
  442.             if al == 'n' then call naturaltop()
  443.             call ppm_DrawLine(notex, zz+3.8, (notex+0.4), zz+3.8)
  444.             call ppm_DrawLine(notex, zz+3.6, (notex+0.4), zz+3.6)
  445.         end
  446.  
  447.         when nn=='e#3'  then
  448.         do
  449.             yw = 2.945
  450.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.32, 0.35, 0.75, 0)
  451.             call ppm_SetSize(20)
  452.             call ppm_TextIntoBox(box#id, 's')
  453.             call ppm_DrawLine(notex, zz+3.8, (notex+0.4), zz+3.8)
  454.             call ppm_DrawLine(notex, zz+3.6, (notex+0.4), zz+3.6)
  455.         end
  456.  
  457.         when nn=='e3'  then
  458.         do
  459.             yw = 2.945
  460.             if al == 'n' then call naturaltop()
  461.             call ppm_DrawLine(notex, zz+3.8, (notex+0.4), zz+3.8)
  462.             call ppm_DrawLine(notex, zz+3.6, (notex+0.4), zz+3.6)
  463.         end
  464.  
  465.         when nn=='eb3' then
  466.         do
  467.             yw = 2.945
  468.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.21, 0.35, 0.75, 0)
  469.             call ppm_SetSize(20)
  470.             call ppm_TextIntoBox(box#id, 'f')
  471.             call ppm_DrawLine(notex, zz+3.8, (notex+0.4), zz+3.8)
  472.             call ppm_DrawLine(notex, zz+3.6, (notex+0.4), zz+3.6)
  473.         end
  474.  
  475.         when nn=='d#3'  then
  476.         do
  477.             yw = 3.045
  478.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.32, 0.35, 0.75, 0)
  479.             call ppm_SetSize(20)
  480.             call ppm_TextIntoBox(box#id, 's')
  481.             call ppm_DrawLine(notex, zz+3.8, (notex+0.4), zz+3.8)
  482.         end
  483.  
  484.         when nn=='d3' then
  485.         do
  486.             yw = 3.045
  487.             if al == 'n' then call naturaltop()
  488.             call ppm_DrawLine(notex, zz+3.8, (notex+0.4), zz+3.8)
  489.         end
  490.  
  491.         when nn=='db3'    then
  492.         do
  493.             yw = 3.045
  494.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.21, 0.35, 0.75, 0)
  495.             call ppm_SetSize(20)
  496.             call ppm_TextIntoBox(box#id, 'f')
  497.             call ppm_DrawLine(notex, zz+3.8, (notex+0.4), zz+3.8)
  498.         end
  499.  
  500.         when nn=='c#3'    then
  501.         do
  502.             yw = 3.145
  503.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.32, 0.35, 0.75, 0)
  504.             call ppm_SetSize(20)
  505.             call ppm_TextIntoBox(box#id, 's')
  506.             call ppm_DrawLine(notex, zz+3.8, (notex+0.4), zz+3.8)
  507.         end
  508.  
  509.         when nn=='c3'     then
  510.         do
  511.             yw = 3.145
  512.             if al == 'n' then call naturaltop()
  513.             call ppm_DrawLine(notex, zz+3.8, (notex+0.4), zz+3.8)
  514.         end
  515.  
  516.         when nn=='b2'     then
  517.         do
  518.             yw = 3.245
  519.             if al == 'n' then call naturaltop()
  520.         end
  521.         when nn=='bb2'     then
  522.         do
  523.             yw = 3.245
  524.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.21, 0.35, 0.75, 0)
  525.             call ppm_SetSize(20)
  526.             call ppm_TextIntoBox(box#id, 'f')
  527.         end
  528.  
  529.         when nn=='a#2'    then
  530.         do
  531.             yw = 3.345
  532.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.32, 0.35, 0.75, 0)
  533.             call ppm_SetSize(20)
  534.             call ppm_TextIntoBox(box#id, 's')
  535.         end
  536.  
  537.         when nn=='a2'     then
  538.         do
  539.             yw = 3.345
  540.             if al == 'n' then call naturaltop()
  541.         end
  542.         when nn=='ab2'    then
  543.         do
  544.             yw = 3.345
  545.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.21, 0.35, 0.75, 0)
  546.             call ppm_SetSize(20)
  547.             call ppm_TextIntoBox(box#id, 'f')
  548.         end
  549.  
  550.         when nn=='g#2'    then
  551.         do
  552.             yw = 3.445
  553.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.32, 0.35, 0.75, 0)
  554.             call ppm_SetSize(20)
  555.             call ppm_TextIntoBox(box#id, 's')
  556.         end
  557.  
  558.         when nn=='g2'     then
  559.         do
  560.             yw = 3.445
  561.             if al == 'n' then call naturaltop()
  562.         end
  563.         when nn=='gb2'    then
  564.         do
  565.             yw = 3.445
  566.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.21, 0.35, 0.75, 0)
  567.             call ppm_SetSize(20)
  568.             call ppm_TextIntoBox(box#id, 'f')
  569.         end
  570.  
  571.         when nn=='f#2'    then
  572.         do
  573.             yw = 3.545
  574.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.32, 0.35, 0.75, 0)
  575.             call ppm_SetSize(20)
  576.             call ppm_TextIntoBox(box#id, 's')
  577.         end
  578.  
  579.         when nn=='f2' then
  580.         do
  581.             yw = 3.545
  582.             if al == 'n' then call naturaltop()
  583.         end
  584.         when nn=='e#2'  then
  585.         do
  586.             yw = 3.645
  587.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.32, 0.35, 0.75, 0)
  588.             call ppm_SetSize(20)
  589.             call ppm_TextIntoBox(box#id, 's')
  590.         end
  591.         when nn=='e2'     then
  592.         do
  593.             yw = 3.645
  594.             if al == 'n' then call naturaltop()
  595.         end
  596.         when nn=='eb2'    then
  597.         do
  598.             yw = 3.645
  599.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.21, 0.35, 0.75, 0)
  600.             call ppm_SetSize(20)
  601.             call ppm_TextIntoBox(box#id, 'f')
  602.         end
  603.  
  604.         when nn=='d#2'    then
  605.         do
  606.             yw = 3.745
  607.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.32, 0.35, 0.75, 0)
  608.             call ppm_SetSize(20)
  609.             call ppm_TextIntoBox(box#id, 's')
  610.         end
  611.  
  612.         when nn=='d2'     then
  613.         do
  614.             yw = 3.745
  615.             if al == 'n' then call naturaltop()
  616.         end
  617.         when nn=='db2'    then
  618.         do
  619.             yw = 3.745
  620.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.21, 0.35, 0.75, 0)
  621.             call ppm_SetSize(20)
  622.             call ppm_TextIntoBox(box#id, 'f')
  623.         end
  624.  
  625.         when nn=='c#2'    then
  626.         do
  627.             yw = 3.845
  628.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.32, 0.35, 0.75, 0)
  629.             call ppm_SetSize(20)
  630.             call ppm_TextIntoBox(box#id, 's')
  631.         end
  632.  
  633.         when nn=='c2'     then
  634.         do
  635.             yw = 3.845
  636.             if al == 'n' then call naturaltop()
  637.         end
  638.         when nn=='b1'     then
  639.         do
  640.             yw = 3.945
  641.             if al == 'n' then call naturaltop()
  642.         end
  643.         when nn=='bb1'     then
  644.         do
  645.             yw = 3.945
  646.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.21, 0.35, 0.75, 0)
  647.             call ppm_SetSize(20)
  648.             call ppm_TextIntoBox(box#id, 'f')
  649.         end
  650.  
  651.         when nn=='a#1'    then
  652.         do
  653.             yw = 4.045
  654.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.32, 0.35, 0.75, 0)
  655.             call ppm_SetSize(20)
  656.             call ppm_TextIntoBox(box#id, 's')
  657.         end
  658.  
  659.         when nn=='a1'     then
  660.         do
  661.             yw = 4.045
  662.             if al == 'n' then call naturaltop()
  663.         end
  664.         when nn=='ab1'    then
  665.         do
  666.             yw = 4.045
  667.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.21, 0.35, 0.75, 0)
  668.             call ppm_SetSize(20)
  669.             call ppm_TextIntoBox(box#id, 'f')
  670.         end
  671.  
  672.         when nn=='g#1'    then
  673.         do
  674.             yw = 4.145
  675.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.32, 0.35, 0.75, 0)
  676.             call ppm_SetSize(20)
  677.             call ppm_TextIntoBox(box#id, 's')
  678.         end
  679.  
  680.         when nn=='g1'     then
  681.         do
  682.             yw = 4.145
  683.             if al == 'n' then call naturaltop()
  684.         end
  685.         when nn=='gb1'    then
  686.         do
  687.             yw = 4.145
  688.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.21, 0.35, 0.75, 0)
  689.             call ppm_SetSize(20)
  690.             call ppm_TextIntoBox(box#id, 'f')
  691.         end
  692.  
  693.         when nn=='f#1'    then
  694.         do
  695.             yw = 4.245
  696.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.32, 0.35, 0.75, 0)
  697.             call ppm_SetSize(20)
  698.             call ppm_TextIntoBox(box#id, 's')
  699.         end
  700.  
  701.         when nn=='f1'     then
  702.         do
  703.             yw = 4.245
  704.             if al == 'n' then call naturaltop()
  705.         end
  706.  
  707.         when nn=='e#1'  then
  708.         do
  709.             yw = 4.345
  710.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.32, 0.35, 0.75, 0)
  711.             call ppm_SetSize(20)
  712.             call ppm_TextIntoBox(box#id, 's')
  713.             call ppm_DrawLine(notex, zz+5, (notex+0.4), zz+5)
  714.         end
  715.         when nn=='e1' then
  716.         do
  717.             yw = 4.345
  718.             if al == 'n' then call naturaltop()
  719.             call ppm_DrawLine(notex, zz+5, (notex+0.4), zz+5)
  720.         end
  721.  
  722.         when nn=='eb1'  then
  723.         do
  724.             yw = 4.345
  725.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.21, 0.35, 0.75, 0)
  726.             call ppm_SetSize(20)
  727.             call ppm_TextIntoBox(box#id, 'f')
  728.             call ppm_DrawLine(notex, zz+5, (notex+0.4), zz+5)
  729.         end
  730.  
  731.         when nn=='d#1'  then
  732.         do
  733.             yw = 4.445
  734.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.32, 0.35, 0.75, 0)
  735.             call ppm_SetSize(20)
  736.             call ppm_TextIntoBox(box#id, 's')
  737.             call ppm_DrawLine(notex, zz+5, (notex+0.4), zz+5)
  738.         end
  739.  
  740.         when nn=='d1'  then
  741.         do
  742.             yw = 4.445
  743.             if al == 'n' then call naturaltop()
  744.             call ppm_DrawLine(notex, zz+5, (notex+0.4), zz+5)
  745.         end
  746.  
  747.         when nn=='db1' then
  748.         do
  749.             yw = 4.445
  750.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.21, 0.35, 0.75, 0)
  751.             call ppm_SetSize(20)
  752.             call ppm_TextIntoBox(box#id, 'f')
  753.             call ppm_DrawLine(notex, zz+5, (notex+0.4), zz+5)
  754.         end
  755.  
  756.         when nn=='c#1'  then
  757.         do
  758.             yw = 4.545
  759.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.32, 0.35, 0.75, 0)
  760.             call ppm_SetSize(20)
  761.             call ppm_TextIntoBox(box#id, 's')
  762.             call ppm_DrawLine(notex, zz+5, (notex+0.4), zz+5)
  763.             call ppm_DrawLine(notex, zz+5.2, (notex+0.4), zz+5.2)
  764.         end
  765.  
  766.         when nn=='c1'  then
  767.         do
  768.             yw = 4.545
  769.             if al == 'n' then call naturaltop()
  770.             call ppm_DrawLine(notex, zz+5, (notex+0.4), zz+5)
  771.             call ppm_DrawLine(notex, zz+5.2, (notex+0.4), zz+5.2)
  772.         end
  773.  
  774.         /* y-place of the notes - noteneck to bottom */
  775.  
  776.         when nn=='G#3'  then
  777.         do
  778.             yw = 3.22
  779.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.15, 0.35, 0.75, 0)
  780.             call ppm_SetSize(20)
  781.             call ppm_TextIntoBox(box#id, 's')
  782.             call ppm_DrawLine(notex, zz+3.8, (notex+0.4), zz+3.8)
  783.             call ppm_DrawLine(notex, zz+3.6, (notex+0.4), zz+3.6)
  784.             call ppm_DrawLine(notex, zz+3.4, (notex+0.4), zz+3.4)
  785.         end
  786.  
  787.         when nn=='G3'  then
  788.         do
  789.             yw = 3.22
  790.             if al == 'n' then call naturalbottom()
  791.             call ppm_DrawLine(notex, zz+3.8, (notex+0.4), zz+3.8)
  792.             call ppm_DrawLine(notex, zz+3.6, (notex+0.4), zz+3.6)
  793.             call ppm_DrawLine(notex, zz+3.4, (notex+0.4), zz+3.4)
  794.         end
  795.  
  796.         when nn=='GB3' then nn = 'Gb3'
  797.         when nn=='Gb3' then
  798.         do
  799.             yw = 3.22
  800.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.27, 0.35, 0.75, 0)
  801.             call ppm_SetSize(20)
  802.             call ppm_TextIntoBox(box#id, 'f')
  803.             call ppm_DrawLine(notex, zz+3.8, (notex+0.4), zz+3.8)
  804.             call ppm_DrawLine(notex, zz+3.6, (notex+0.4), zz+3.6)
  805.             call ppm_DrawLine(notex, zz+3.4, (notex+0.4), zz+3.4)
  806.         end
  807.  
  808.         when nn=='F#3'  then
  809.         do
  810.             yw = 3.32
  811.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.15, 0.35, 0.75, 0)
  812.             call ppm_SetSize(20)
  813.             call ppm_TextIntoBox(box#id, 's')
  814.             call ppm_DrawLine(notex, zz+3.8, (notex+0.4), zz+3.8)
  815.             call ppm_DrawLine(notex, zz+3.6, (notex+0.4), zz+3.6)
  816.         end
  817.  
  818.         when nn=='F3'  then
  819.         do
  820.             yw = 3.32
  821.             if al == 'n' then call naturalbottom()
  822.             call ppm_DrawLine(notex, zz+3.8, (notex+0.4), zz+3.8)
  823.             call ppm_DrawLine(notex, zz+3.6, (notex+0.4), zz+3.6)
  824.         end
  825.  
  826.         when nn=='E#3'  then
  827.         do
  828.             yw = 3.42
  829.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.15, 0.35, 0.75, 0)
  830.             call ppm_SetSize(20)
  831.             call ppm_TextIntoBox(box#id, 's')
  832.             call ppm_DrawLine(notex, zz+3.8, (notex+0.4), zz+3.8)
  833.             call ppm_DrawLine(notex, zz+3.6, (notex+0.4), zz+3.6)
  834.         end
  835.  
  836.         when nn=='E3'  then
  837.         do
  838.             yw = 3.42
  839.             if al == 'n' then call naturalbottom()
  840.             call ppm_DrawLine(notex, zz+3.8, (notex+0.4), zz+3.8)
  841.             call ppm_DrawLine(notex, zz+3.6, (notex+0.4), zz+3.6)
  842.         end
  843.  
  844.         when nn=='EB3' then nn = 'Eb3'
  845.         when nn=='Eb3' then
  846.         do
  847.             yw = 3.42
  848.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.27, 0.35, 0.75, 0)
  849.             call ppm_SetSize(20)
  850.             call ppm_TextIntoBox(box#id, 'f')
  851.             call ppm_DrawLine(notex, zz+3.8, (notex+0.4), zz+3.8)
  852.             call ppm_DrawLine(notex, zz+3.6, (notex+0.4), zz+3.6)
  853.         end
  854.  
  855.         when nn=='D#3'  then
  856.         do
  857.             yw = 3.52
  858.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.15, 0.35, 0.75, 0)
  859.             call ppm_SetSize(20)
  860.             call ppm_TextIntoBox(box#id, 's')
  861.             call ppm_DrawLine(notex, zz+3.8, (notex+0.4), zz+3.8)
  862.         end
  863.  
  864.         when nn=='D3' then
  865.         do
  866.             yw = 3.52
  867.             if al == 'n' then call naturalbottom()
  868.             call ppm_DrawLine(notex, zz+3.8, (notex+0.4), zz+3.8)
  869.         end
  870.  
  871.         when nn=='DB3' then nn = 'Db3'
  872.         when nn=='Db3' then
  873.         do
  874.             yw = 3.52
  875.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.27, 0.35, 0.75, 0)
  876.             call ppm_SetSize(20)
  877.             call ppm_TextIntoBox(box#id, 'f')
  878.             call ppm_DrawLine(notex, zz+3.8, (notex+0.4), zz+3.8)
  879.         end
  880.  
  881.         when nn=='C#3'    then
  882.         do
  883.             yw = 3.62
  884.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.15, 0.35, 0.75, 0)
  885.             call ppm_SetSize(20)
  886.             call ppm_TextIntoBox(box#id, 's')
  887.             call ppm_DrawLine(notex, zz+3.8, (notex+0.4), zz+3.8)
  888.         end
  889.  
  890.         when nn=='C3'     then
  891.         do
  892.             yw = 3.62
  893.             if al == 'n' then call naturalbottom()
  894.             call ppm_DrawLine(notex, zz+3.8, (notex+0.4), zz+3.8)
  895.         end
  896.  
  897.         when nn=='B2'     then
  898.         do
  899.             yw = 3.72
  900.             if al == 'n' then call natural()
  901.         end
  902.         when nn=='BB2' then  nn = 'Bb2'
  903.         when nn=='Bb2'     then
  904.         do
  905.             yw = 3.72
  906.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.27, 0.35, 0.75, 0)
  907.             call ppm_SetSize(20)
  908.             call ppm_TextIntoBox(box#id, 'f')
  909.         end
  910.  
  911.         when nn=='A#2'    then
  912.         do
  913.             yw = 3.82
  914.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.15, 0.35, 0.75, 0)
  915.             call ppm_SetSize(20)
  916.             call ppm_TextIntoBox(box#id, 's')
  917.         end
  918.  
  919.         when nn=='A2'     then
  920.         do
  921.             yw = 3.82
  922.             if al == 'n' then call naturalbottom()
  923.         end
  924.         when nn=='AB2'    then nn = 'Ab2'
  925.         when nn=='Ab2'    then
  926.         do
  927.             yw = 3.82
  928.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.27, 0.35, 0.75, 0)
  929.             call ppm_SetSize(20)
  930.             call ppm_TextIntoBox(box#id, 'f')
  931.         end
  932.  
  933.         when nn=='G#2'    then
  934.         do
  935.             yw = 3.92
  936.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.15, 0.35, 0.75, 0)
  937.             call ppm_SetSize(20)
  938.             call ppm_TextIntoBox(box#id, 's')
  939.         end
  940.  
  941.         when nn=='G2'     then
  942.         do
  943.             yw = 3.92
  944.             if al == 'n' then call naturalbottom()
  945.         end
  946.         when nn=='GB2'    then nn = 'Gb2'
  947.         when nn=='Gb2'    then
  948.         do
  949.             yw = 3.92
  950.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.27, 0.35, 0.75, 0)
  951.             call ppm_SetSize(20)
  952.             call ppm_TextIntoBox(box#id, 'f')
  953.         end
  954.  
  955.         when nn=='F#2'    then
  956.         do
  957.             yw = 4.02
  958.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.15, 0.35, 0.75, 0)
  959.             call ppm_SetSize(20)
  960.             call ppm_TextIntoBox(box#id, 's')
  961.         end
  962.  
  963.         when nn=='F2'     then
  964.         do
  965.             yw = 4.02
  966.             if al == 'n' then call naturalbottom()
  967.         end
  968.         when nn=='E#2'    then
  969.         do
  970.             yw = 4.12
  971.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.15, 0.35, 0.75, 0)
  972.             call ppm_SetSize(20)
  973.             call ppm_TextIntoBox(box#id, 's')
  974.         end
  975.  
  976.         when nn=='E2'     then
  977.         do
  978.             yw = 4.12
  979.             if al == 'n' then call naturalbottom()
  980.         end
  981.         when nn=='EB2'    then nn = 'Eb2'
  982.         when nn=='Eb2'    then
  983.         do
  984.             yw = 4.12
  985.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.27, 0.35, 0.75, 0)
  986.             call ppm_SetSize(20)
  987.             call ppm_TextIntoBox(box#id, 'f')
  988.         end
  989.  
  990.         when nn=='D#2'    then
  991.         do
  992.             yw = 4.22
  993.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.15, 0.35, 0.75, 0)
  994.             call ppm_SetSize(20)
  995.             call ppm_TextIntoBox(box#id, 's')
  996.         end
  997.  
  998.         when nn=='D2'     then
  999.         do
  1000.             yw = 4.22
  1001.             if al == 'n' then call naturalbottom()
  1002.         end
  1003.         when nn=='DB2'    then nn = 'Db2'
  1004.         when nn=='Db2'    then
  1005.         do
  1006.             yw = 4.22
  1007.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.27, 0.35, 0.75, 0)
  1008.             call ppm_SetSize(20)
  1009.             call ppm_TextIntoBox(box#id, 'f')
  1010.         end
  1011.  
  1012.         when nn=='C#2'    then
  1013.         do
  1014.             yw = 4.32
  1015.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.15, 0.35, 0.75, 0)
  1016.             call ppm_SetSize(20)
  1017.             call ppm_TextIntoBox(box#id, 's')
  1018.         end
  1019.  
  1020.         when nn=='C2'     then
  1021.         do
  1022.             yw = 4.32
  1023.             if al == 'n' then call naturalbottom()
  1024.         end
  1025.         when nn=='B1'     then yw = 4.42
  1026.         when nn=='BB1'     then  nn='Bb1'
  1027.         when nn=='Bb1'     then
  1028.         do
  1029.             yw = 4.42
  1030.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.27, 0.35, 0.75, 0)
  1031.             call ppm_SetSize(20)
  1032.             call ppm_TextIntoBox(box#id, 'f')
  1033.         end
  1034.  
  1035.         when nn=='A#1'    then
  1036.         do
  1037.             yw = 4.52
  1038.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.15, 0.35, 0.75, 0)
  1039.             call ppm_SetSize(20)
  1040.             call ppm_TextIntoBox(box#id, 's')
  1041.         end
  1042.  
  1043.         when nn=='A1'     then
  1044.         do
  1045.             yw = 4.52
  1046.             if al == 'n' then call naturalbottom()
  1047.         end
  1048.         when nn=='AB1'    then nn = 'Ab1'
  1049.         when nn=='Ab1'    then
  1050.         do
  1051.             yw = 4.52
  1052.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.27, 0.35, 0.75, 0)
  1053.             call ppm_SetSize(20)
  1054.             call ppm_TextIntoBox(box#id, 'f')
  1055.         end
  1056.  
  1057.         when nn=='G#1'    then
  1058.         do
  1059.             yw = 4.62
  1060.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.15, 0.35, 0.75, 0)
  1061.             call ppm_SetSize(20)
  1062.             call ppm_TextIntoBox(box#id, 's')
  1063.         end
  1064.  
  1065.         when nn=='G1'     then
  1066.         do
  1067.             yw = 4.62
  1068.             if al == 'n' then call naturalbottom()
  1069.         end
  1070.         when nn=='GB1'    then nn = 'Gb1'
  1071.         when nn=='Gb1'    then
  1072.         do
  1073.             yw = 4.62
  1074.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.27, 0.35, 0.75, 0)
  1075.             call ppm_SetSize(20)
  1076.             call ppm_TextIntoBox(box#id, 'f')
  1077.         end
  1078.  
  1079.         when nn=='F#1'    then
  1080.         do
  1081.             yw = 4.72
  1082.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.15, 0.35, 0.75, 0)
  1083.             call ppm_SetSize(20)
  1084.             call ppm_TextIntoBox(box#id, 's')
  1085.         end
  1086.  
  1087.         when nn=='F1'     then
  1088.         do
  1089.             yw = 4.72
  1090.             if al == 'n' then call naturalbottom()
  1091.         end
  1092.  
  1093.         when nn=='E#1'    then
  1094.         do
  1095.             yw = 4.82
  1096.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.15, 0.35, 0.75, 0)
  1097.             call ppm_SetSize(20)
  1098.             call ppm_TextIntoBox(box#id, 's')
  1099.             call ppm_DrawLine(notex, zz+5, (notex+0.4), zz+5)
  1100.         end
  1101.  
  1102.         when nn=='E1' then
  1103.         do
  1104.             yw = 4.82
  1105.             if al == 'n' then call naturalbottom()
  1106.             call ppm_DrawLine(notex, zz+5, (notex+0.4), zz+5)
  1107.         end
  1108.  
  1109.         when nn=='EB1'    then nn = 'Eb1'
  1110.         when nn=='Eb1'  then
  1111.         do
  1112.             yw = 4.82
  1113.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.27, 0.35, 0.75, 0)
  1114.             call ppm_SetSize(20)
  1115.             call ppm_TextIntoBox(box#id, 'f')
  1116.             call ppm_DrawLine(notex, zz+5, (notex+0.4), zz+5)
  1117.         end
  1118.  
  1119.         when nn=='D#1'  then
  1120.         do
  1121.             yw = 4.92
  1122.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.15, 0.35, 0.75, 0)
  1123.             call ppm_SetSize(20)
  1124.             call ppm_TextIntoBox(box#id, 's')
  1125.             call ppm_DrawLine(notex, zz+5, (notex+0.4), zz+5)
  1126.         end
  1127.  
  1128.         when nn=='D1'  then
  1129.         do
  1130.             yw = 4.92
  1131.             if al == 'n' then call naturalbottom()
  1132.             call ppm_DrawLine(notex, zz+5, (notex+0.4), zz+5)
  1133.         end
  1134.  
  1135.         when nn=='DB1'    then nn = 'Db1'
  1136.         when nn=='Db1' then
  1137.         do
  1138.             yw = 4.92
  1139.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.27, 0.35, 0.75, 0)
  1140.             call ppm_SetSize(20)
  1141.             call ppm_TextIntoBox(box#id, 'f')
  1142.             call ppm_DrawLine(notex, zz+5, (notex+0.4), zz+5)
  1143.         end
  1144.  
  1145.         when nn=='C#1'  then
  1146.         do
  1147.           yw = 5.02
  1148.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.15, 0.35, 0.75, 0)
  1149.             call ppm_SetSize(20)
  1150.             call ppm_TextIntoBox(box#id, 's')
  1151.           call ppm_DrawLine(notex, zz+5, (notex+0.4), zz+5)
  1152.           call ppm_DrawLine(notex, zz+5.2, (notex+0.4), zz+5.2)
  1153.         end
  1154.  
  1155.         when nn=='C1'  then
  1156.         do
  1157.           yw = 5.02
  1158.             if al == 'n' then call naturalbottom()
  1159.           call ppm_DrawLine(notex, zz+5, (notex+0.4), zz+5)
  1160.           call ppm_DrawLine(notex, zz+5.2, (notex+0.4), zz+5.2)
  1161.         end
  1162.         otherwise
  1163.                do
  1164.                 call ppm_ClearStatus()
  1165.                 exit_msg("There was an error !")
  1166.                end
  1167.     end
  1168.  
  1169.         /* measures of a notebox */
  1170.  
  1171.         notewidht = 0.64
  1172.         noteheight = 0.97
  1173.  
  1174.  
  1175.         boxid = ppm_CreateBox(notex, yw+zz, notewidht, noteheight, 0)
  1176.         call ppm_SetSize(notepkt)
  1177.         call ppm_TextIntoBox(boxid, nw)
  1178.         notex = (notex + xw)
  1179.         if notex >=18.7 then
  1180.             do
  1181.               notex = 2.5
  1182.               zz = zz + 4
  1183.             end
  1184.      return
  1185. end
  1186. exit
  1187.  
  1188. naturaltop:
  1189. do
  1190.   Pbox = ppm_CreateBox(notex-0.34, yw+zz+0.07, 0.6, 1.2, 0)
  1191.   boxnm = ppm_DocNextBox(Pbox)
  1192.   call ppm_DeleteContents(boxnm)
  1193.   call ppm_ImportGraphic(boxnm, 'Genies:note_pause/naturalsng', Zeichen)
  1194.   return
  1195. end
  1196.  
  1197. naturalbottom:
  1198. do
  1199.   Pbox = ppm_CreateBox(notex-0.34, yw+zz-0.4, 0.6, 1.2, 0)
  1200.   boxnm = ppm_DocNextBox(Pbox)
  1201.   call ppm_DeleteContents(boxnm)
  1202.   call ppm_ImportGraphic(boxnm, 'Genies:note_pause/naturalsng', Zeichen)
  1203.   return
  1204. end
  1205.  
  1206.  
  1207. break_d:
  1208. break_e:
  1209. break_c:
  1210. halt:
  1211.     call exit_msg("User aborted Genie!")
  1212.  
  1213. exit_msg: procedure
  1214. do
  1215.     parse arg message
  1216.  
  1217.     if message ~= '' then
  1218.     call ppm_Inform(1,message,)
  1219.  
  1220.     call ppm_ClearStatus()
  1221.     call ppm_AutoUpdate(1)
  1222.     exit
  1223. end
  1224.